<?php

namespace App\Services;

use App\Utils\Sign;

class SignService extends BaseService {

    /**
    *获取签名
     */
    public static function getSign($data, $env){
        $config = self::getConfig();
        if($env){
            $config = $config['real'];
        }else{
            $config = $config['noReal'];
        }
        $sign = ['signature' => Sign::colsign($data, $config['app_secret'])];
        $info = array_merge($data, $sign);
        return $info;
    }
}
